Dynomotion

Group: DynoMotion Message: 12810 From: scotttyler999 Date: 2/20/2016
Subject: some KFLOP KmotionX Par software questions

1.       I’m writing my own C++ Kflop control software and don’t like the Kmotion dll/Kmotionserver go-between.  Currently that means Kmotion dll-direct.h.  Is the is the most straight forward approach? Is this the correct approach?


2.       What is the correct way to initialize a Kflop using KmotionX (Par Hanson) using only Kmotion .dll-direct files?


3.       Can I do the above without missing a delete or memory cleanup: i.e., segfault?

 

4.       Where is the persist.userData and how do I find it in getstatus using the modbusmasterver1.c as a source? Are all persist.userdata available to getstatus?

 

5.       How would I use persist.user Data to transfer three digit floating point numbe3rs through the Modbus to getstatus?  Needs to come from PLC Modbus through Kflop into getstatus?


6.    I have tried to use the KMotionServer compiled from the KMotionX branch over TCP but it consistently disconnects after issuing a command. Thoughts? 



Thanks! 

Josiah

Group: DynoMotion Message: 12812 From: Hardy Family Date: 2/21/2016
Subject: Re: some KFLOP KmotionX Par software questions
What platform are you using?  TCP connection only works on Linux.  And the Linux version is still fairly experimental (no Dynomotion support) so be prepared to do some bug finding.  I have not had any major problems building and running KMotionX/kmotionServer on 64-bit intel (Ubuntu/gcc or Windows 7/VS community edition) or the Raspberry Pi or Beaglebone (Ubuntu/gcc).

While it's true that direct connection is "simpler", I don't have any personal experience using it.  Everybody uses the server arrangement, and only the server itself uses the direct connection.

Not sure what you mean by (3).  Certainly, with the direct DLL any sigsegv will cause your entire app to crash, whereas if the server has an error it will just cause a disconnection to your app and the kflop.

Regarding modbus, I haven't used it so you'll need to do some source code digging.

Regards,
SJH


On Sat, Feb 20, 2016 at 12:50 PM, scotttyler999@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

1.       I’m writing my own C++ Kflop control software and don’t like the Kmotion dll/Kmotionserver go-between.  Currently that means Kmotion dll-direct.h.  Is the is the most straight forward approach? Is this the correct approach?


2.       What is the correct way to initialize a Kflop using KmotionX (Par Hanson) using only Kmotion .dll-direct files?


3.       Can I do the above without missing a delete or memory cleanup: i.e., segfault?

 

4.       Where is the persist.userData and how do I find it in getstatus using the modbusmasterver1.c as a source? Are all persist.userdata available to getstatus?

 

5.       How would I use persist.user Data to transfer three digit floating point numbe3rs through the Modbus to getstatus?  Needs to come from PLC Modbus through Kflop into getstatus?


6.    I have tried to use the KMotionServer compiled from the KMotionX branch over TCP but it consistently disconnects after issuing a command. Thoughts? 



Thanks! 

Josiah


Group: DynoMotion Message: 12813 From: Tom Kerekes Date: 2/21/2016
Subject: Re: some KFLOP KmotionX Par software questions
Hi Josiah,

#1,#2,#3 Why don't you like the KMotionServer approach?  Without that you would loose multi-process access to KFLOP Boards.

#4 I don't understand the question.  But no not all 200 persist.UserData variables are in the status record defined in PC-DSP.h

#5 ModBus normally deals with 16-bit integer resisters.  Also the persist.UserData is defined as 32-bit integers.   But one method to transfer a 32-bit float from the KFLOP to the PC is to save the binary image of a 32-Bit float into a persist variable.  Upload it as an integer (either as decimal or hexadecimal).  Then cast the 32-bit image as a 32-bit float. 

#6 I don't know.

Regards
TK


On 2/20/2016 12:50 PM, scotttyler999@... [DynoMotion] wrote:
 

1.       I’m writing my own C++ Kflop control software and don’t like the Kmotion dll/Kmotionserver go-between.  Currently that means Kmotion dll-direct.h.  Is the is the most straight forward approach? Is this the correct approach?


2.       What is the correct way to initialize a Kflop using KmotionX (Par Hanson) using only Kmotion .dll-direct files?


3.       Can I do the above without missing a delete or memory cleanup: i.e., segfault?

 

4.       Where is the persist.userData and how do I find it in getstatus using the modbusmasterver1.c as a source? Are all persist.userdata available to getstatus?

 

5.       How would I use persist.user Data to transfer three digit floating point numbe3rs through the Modbus to getstatus?  Needs to come from PLC Modbus through Kflop into getstatus?


6.    I have tried to use the KMotionServer compiled from the KMotionX branch over TCP but it consistently disconnects after issuing a command. Thoughts? 



Thanks! 

Josiah